﻿<Window x:Class="Replayer.Wpf.Ui.Experimental.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit">
    
    <Window.Resources>
        <!--A template for showing tracks as a summary.
        This is currently used to present tracks as accordion items-->
        <DataTemplate x:Key="tracksTemplate" DataType="Annotation:Track">
            <StackPanel Margin="3 3 3 3" Orientation="Horizontal" Background="Red">
                <!--<StackPanel.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="Delete"
                                  Command="EditingCommands.Delete"
                                  CommandParameter="{Binding}"/>
                    </ContextMenu>
                </StackPanel.ContextMenu>-->
                <TextBlock Text="{Binding Path=Name}" FontWeight="bold"/>
                <TextBlock Text=", "/>
                <TextBlock Text="{Binding Path=Url}"/>
            </StackPanel>
        </DataTemplate>

    </Window.Resources>
    <Grid>
        <my:Accordion 
                                  ItemTemplate="{StaticResource tracksTemplate}" 
                                 SelectionMode="ZeroOrOne"
                      SelectionSequence="CollapseBeforeExpand"

            Height="169" HorizontalAlignment="Left" Margin="87,130,0,0" Name="accordion1" VerticalAlignment="Top" Width="381" />
        <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="34,29,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
    </Grid>
</Window>
